const getAgentInfoRecord = require("./getAgentInfoRecord/index");
const getAgentInfoDetail = require("./getAgentInfoDetail/index");
const exportAgentInfoRecord = require("./exportAgentInfoRecord/index");
const getAgentConsumeRecord = require("./getAgentConsumeRecord/index");
const getAgentConsumeDetail = require("./getAgentConsumeDetail/index");
const exportAgentConsumeRecord = require("./exportAgentConsumeRecord/index");
const getAgentDiscountRecord = require("./getAgentDiscountRecord/index");
const getAgentDiscountDetail = require("./getAgentDiscountDetail/index");
const exportAgentDiscountRecord = require("./exportAgentDiscountRecord/index");
const getAgentCouponRecord = require("./getAgentCouponRecord/index");
const getCouponChart = require("./getCouponChart/index");

// 云函数入口函数
exports.main = async (event, context) => {
    switch (event.type) {
        case "getAgentInfoRecord":
            return await getAgentInfoRecord.main(event, context);
        case "getAgentInfoDetail":
            return await getAgentInfoDetail.main(event, context);
        case "exportAgentInfoRecord":
            return await exportAgentInfoRecord.main(event, context);
        case "getAgentConsumeRecord":
            return await getAgentConsumeRecord.main(event, context);
        case "getAgentConsumeDetail":
            return await getAgentConsumeDetail.main(event, context);
        case "exportAgentConsumeRecord":
            return await exportAgentConsumeRecord.main(event, context);
        case "getAgentDiscountRecord":
            return await getAgentDiscountRecord.main(event, context);
        case "getAgentDiscountDetail":
            return await getAgentDiscountDetail.main(event, context);
        case "exportAgentDiscountRecord":
            return await exportAgentDiscountRecord.main(event, context);
        case "getAgentCouponRecord":
            return await getAgentCouponRecord.main(event, context);
        case "getCouponChart":
            return await getCouponChart.main(event, context);
    }
};